import net.tribal.escpos.EscPosProvider
import net.tribal.escpos.services.EscPosService
import static org.junit.Assert.*;
import org.junit.Test;

public class EscPosTest {
   
	def escpos = new EscPosProvider()
	def escposService = new EscPosService()

    @Test public void testGreet() {
		def out = new StringBuffer()
        escpos.doInitialize(null, out)
		out << "FooHi"
		escpos.doLineFeed(null, out)
		escpos.doPrintBarCode(['barcode':'upca', 'code':'123456789'], out)

		println out
		escposService.printFile(out.toString(), 'PRP-058')
		assert(true)
    }
}